﻿<UserControl x:Class="DSoft.RDLC.LightDoubleSlider"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" Height="26" Width="767">

    <!--
    CREDIT : 2013-2014 Derek Tremblay (abbaye)
    https://rdlcprinter.codeplex.com/
    -->

    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="./Style/ButtonDictionary.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>

    <Grid x:Name="SliderRow" >
        <!--<Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>-->
        
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                <Button x:Name="FirstButton"
                        Style="{StaticResource FlatButtonStyle}" 
                        Click="FirstButton_Click"
                        >
                    <Image Source="Resources/move-first.ico" 
                            RenderOptions.BitmapScalingMode="HighQuality" 
                            SnapsToDevicePixels="True" 
                            />
                </Button>
                
                <Button x:Name="PreviousButton"
                        Style="{StaticResource FlatButtonStyle}"
                        Click="PreviousButton_Click"
                        >
                    <Image Source="Resources/move-previous.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
                </Button>
            </StackPanel>
        
            <StackPanel HorizontalAlignment="Stretch" Margin="52,0">
                <Border BorderBrush="LightBlue" BorderThickness="1">
                    <Slider x:Name="ChartSlider" 
                            Grid.Row="1" 
                            Orientation="Horizontal"  
                            Cursor="Hand" 
                            ValueChanged="ChartSlider_ValueChanged" 
                            TickPlacement="BottomRight" 
                            IsSnapToTickEnabled="True" 
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Center" Height="25"
                    />
                </Border>
            </StackPanel>
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="1">
                <Button x:Name="NextButton"
                        Style="{StaticResource FlatButtonStyle}" 
                        Click="NextButton_Click"
                        >
                    <Image Source="Resources/move-next.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
                </Button>
                <Button x:Name="LastButton"
                        Style="{StaticResource FlatButtonStyle}" 
                        Click="LastButton_Click"
                        >
                    <Image Source="Resources/move-last.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
                </Button>
            </StackPanel>
        </Grid>
</UserControl>
